home *** CD-ROM | disk | FTP | other *** search
- '\" Copyright 1989 Regents of the University of California
- '\" Permission to use, copy, modify, and distribute this
- '\" documentation for any purpose and without fee is hereby
- '\" granted, provided that this notice appears in all copies.
- '\" The University of California makes no representations about
- '\" the suitability of this material for any purpose. It is
- '\" provided "as is" without express or implied warranty.
- '\"
- '\" $Header: /sprite/src/admin/fsattach/RCS/fsattach.man,v 1.5 91/01/12 16:49:27 jhh Exp $ SPRITE (Berkeley)
- '/"
- .so \*(]ltmac.sprite
- .HS FSATTACH cmds
- .BS
- '\" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- fsattach \- Check disks and export prefixes
- .SH SYNOPSIS
- \fBfsattach\fR [\fIoptions\fR]
- .SH OPTIONS
- .IP "\fB\-m \fIfile\fR" 15
- Read mount table from \fIfile\fR.
- .IP "\fB\-W\fR" 15
- Check disks, but do not write changes.
- .IP "\fB\-f\fR" 15
- Don't check disks (fastboot).
- .IP "\fB\-s\fR" 15
- Ignore group information found in mount table and run \fBfscheck\fR
- sequentially.
- .IP "\fB\-v\fR" 15
- Have both \fBfsattach\fR and \fBfscheck\fR output verbose information
- while running.
- .IP "\fB\-n\fR" 15
- Don't attach disks or export prefixes.
- .IP "\fB\-p\fR" 15
- Print out actions but don't execute them.
- .IP "\fB\-help\fR" 15
- Print a summary of the command-line options and exit.
- .IP "\fB\-d \fIdeviceDirectory\fR" 15
- Specifies the directory containing the device files.
- The default is "/dev".
- .IP "\fB\-k\fR" 15
- Produce debugging output.
- .IP "\fB\-i \fIspriteID\fR" 15
- Causes prefixes that this machine will export to be preloaded into the
- prefix table.
- This prevents the machine from broadcasting for its own prefixes while
- the disks are being checked.
- .IP "\fB\-j \fImaxJobs\fR" 15
- The default behavior is for \fBfsattach\fR to run as many \fBfscheck\fR
- jobs in parallel as it can.
- The parallelism is limited by the \fIgroup\fR of each device (see below),
- and the \fB\-j\fR flag.
- If this flag is used then at most \fImaxJobs\fR \fIfscheck\fRs will
- be run at a time.
- .IP "\fB\-fscheck \fIfscheckProg\fR" 15
- Use this to specify an alternative fscheck program, i.e. when testing
- a new fscheck.
- .IP "\fB\-c\fR 15
- Conditionally check the disks. If the disks were just checked by \fIfscheck\fR
- and we are now rebooting, then we don't have to check again. If the \fB\-c\fR
- flag is present then the disks won't be rechecked.
- .BE
-
- .SH DESCRIPTION
- .PP
- \fBFsattach\fR is used during system boot to check the disks for
- inconsistencies and
- to export prefixes.
- The input to \fBfsattach\fR is a mount table, usually in
- \fI/hosts/$HOST/mount\fR.
- The location of the mount table is specified by the
- \fB\-m\fR option.
- \fBFsattach\fR uses the pass information in the mount table to create child
- processes that check
- the disk partitions using \fBfscheck\fR.
- The output from \fBfscheck\fR is appended to a file with the same name as
- the device and the suffix ".fsc".
- If \fBfscheck\fR completes normally,
- then the filesystem is mounted and its prefix exported.
- .SH MOUNT TABLE
- The mount table contains information on checking the disks and on exporting
- prefixes.
- Each line in the table consists of a command and its arguments.
- Blank lines and lines that begin with '#' are ignored.
- The \fBAttach\fR command is used to check a disk partition and to attach the
- partition to the file system.
- \fBAttach\fR commands have the following format:
- .sp
- .in 5
- \fBAttach\fR \fIprefix\fR \fIdevice\fR \fIgroup\fR \fIscope\fR \fIaccess\fR
- .in 0
- .LP
- \fIPrefix\fR is the prefix under which to mount the partition.
- .LP
- The \fIdevice\fR is the
- device on which to run fscheck and to attach.
- .LP
- The \fIgroup\fR parameter is used to determine the parallelism in checking the
- disks. \fBFscheck\fR is a very IO constrained application.
- Most of the execution time is spent waiting for the disk.
- If the system has more than one disk the overall run time of \fBfsattach\fR can
- be decreased by checking different disks at the same time.
- \fIFsattach\fR will run jobs in parallel if possible.
- Any partitions that are in the same group will NOT be checked
- in parallel.
- A group name is any sequence of characters and is case sensitive.
- The group name "root" has special significance.
- It is used as the group of the root partition.
- This partition is checked before all other partitions,
- and the server may have to reboot if an error is found in this partition.
- .LP
- The \fIscope\fR can be either local or export.
- Partitions with local scope are attached only for the local machine,
- whereas partitions with export scope are attached and exported under the
- given prefix.
- The prefix corresponding to the root partition (usually /bootTmp) is
- attached during system boot and is not reattached by \fBfsattach\fR.
- For this partition the scope parameter does not have any effect.
- .LP
- The \fIaccess\fR is used to set the access permissions of the prefix.
- If the access is "r" then the prefix is read only.
- If the access is "rw" then the prefix is can be both read and written.
- The access parameter has no effect if the partition is the root partition.
- .PP
- The \fBExport\fR command is used to export a prefix under a different name.
- \fBExport\fR commands have the following format:
- .sp
- .in 5
- \fBExport\fR \fIprefix\fR \fIlocalPath\fR
- .in 0
- .LP
- \fIPrefix\fR is the name of the prefix to be exported.
- .LP
- \fILocalPath\fR is the name of a path that is to be exported as \fIprefix\fR.
- .PP
- All other non-comment lines are interpreted as containing arguments to
- \fBfscheck\fR.
- The format of these lines is:
- .sp
- .in 5
- \fIdeviceName\fR \fI[arguments]\fR
- .in 0
- .LP
- \fIDeviceName\fR is the name of the device for which \fBfscheck\fR is to use the
- \fIarguments\fR. A device name of \fBall\fR will cause \fBfscheck\fR to use the
- arguments for all devices. Any number of arguments can follow the device
- name,
- as long as they fit on a single line.
- The same device name can appear on any number of lines.
- .PP
- The following is a sample mount table. The root partition is
- \fI/dev/rsd0a\fR and
- it is exported under the prefix \fI/t1\fR.
- \fI/t2\fR is another small partition on
- the same disk.
- \fI/b\fR is a large partition on the disk, and \fI/a\fR is a large partition
- that is an entire second disk.
- .KS
- .DS
- #<Command> <Prefix> <Device/Path> <Group> <Scope> <Access>
-
- Attach /t1 /dev/rsd0a root export rw
- Attach /t2 /dev/rsd0b A export rw
- Attach /b /dev/rsd0g A export rw
- Attach /a /dev/rsd1c B export rw
-
- Export /foo /t2
-
- #<Device> <Arguments to fscheck>
-
- all -readBlock 10
- /dev/rsd0b -outputFile foo
- .DE
- .KE
- .SH RETURN CODES
- \fBFsattach\fR returns one of the following codes upon exit.
- .IP 0
- No error.
- .IP 1
- An error was found in the root partition. Reboot the system. See \fBfscheck\fR
- for details.
- .IP 2
- A hard error occurred. There was some problem in either \fBfsattach\fR,
- \fBfscheck\fR,
- or \fBprefix\fR that prevented \fBfsattach\fR from completing normally.
- .IP 3
- \fBFscheck\fR returned a soft error indication. See \fBfscheck\fR for details.
- .IP 4
- An error was found in the root partition, but the number of consecutive
- times that \fBfscheck\fR was run and an error found exceeds the limit.
- .KS
- .SH FILES
- .DS L
- .nf
- /boot/cmds/fscheck command to check disks
- /hosts/$HOST/*.fsc output from fscheck
- /bootTmp/.fscheck.out temporary output from fscheck
- .DE
- .KE
- .fi
- .SH KEYWORDS
- fsattach, fscheck, prefix, mount, disk, partition, crash, attach, boot
-
-